<html>
<#include "../common/header.ftl">

<body>
<div id="wrapper" class="toggled">

    <#--边栏sidebar-->
    <#include "../common/nav.ftl">


    <#--主要内容content-->
    <div id="page-content-wrapper">
        <div class="container">
            <div class="row clearfix">
                <div class="col-md-4 column">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th>合同id</th>
                            <th>合同总金额</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>${contactDetailDto.contactId}</td>
                            <td>${contactDetailDto.contactMoney}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <#--订单详情表数据-->
                <div class="col-md-12 column">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th>商品id</th>
                            <th>商品名称</th>
                            <th>价格</th>
                            <th>数量</th>
                            <th>总额</th>
                            <th>状态</th>
                            <th>发货单缺量</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#list contactDetailDto.productDtos as productDto>
                            <tr>
                                <td>${productDto.productId}</td>
                                <td>${productDto.productName}</td>
                                <td>${productDto.productPrice}</td>
                                <td>${productDto.number}</td>
                                <td>${productDto.productamount}</td>
                                <td>${productDto.getProcuctStatusEnum().getmessage()}</td>
                                <td>${productDto.notout}</td>
                                <td>
                                    <#if productDto.getProcuctStatusEnum().getCode()!= 2>
                                      <div class="col-md-12 column">
                                             <a href="/sell/seller/contact/send/index?contactId=${contactDetailDto.contactId}&productId=${productDto.productId}" type="button" class="btn btn-default btn-primary">生成发货单</a>
                                      </div>
                                        <#else>
                                            <div class="col-md-12 column">
                                                <a href="#" type="button" class="btn btn-default btn-warning">发货单已全</a>
                                            </div>
                                    </#if>

                                </td>

                            </tr>

                        <#--操作-->
                        </#list>
                        </tbody>
                    </table>
                </div>
                <#--合同的发货单详情表数据-->
                <div class="col-md-12 column">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th>发货单id</th>
                            <th>商品id</th>
                            <th>发货数量</th>
                            <th>发货单状态</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#list sendProductList as sendlist>
                            <tr>
                                <td>${sendlist.sendId}</td>
                                <td>${sendlist.productId}</td>
                                <td>${sendlist.productQuantity}</td>
                                <td>${sendlist.getSendProductStatusEnum().message}</td>

                            </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>

            </div>
        </div>
    </div>
</div>

</body>
</html>